home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2011 April / ME_2011_04.iso / [Video-Tutorial] / 9430830 / bookmarks.swf / scripts / frame_1 / DoAction_3.as < prev    next >
Encoding:
Text File  |  2009-11-16  |  24.8 KB  |  811 lines

  1. function loadContentXml()
  2. {
  3.    cd_content = new XML();
  4.    cd_content.ignoreWhite = true;
  5.    cd_content.load(contPath);
  6.    cd_content.onLoad = contentOnLoad;
  7.    cd_content.load(contPath);
  8. }
  9. function contentOnLoad(success)
  10. {
  11.    if(success)
  12.    {
  13.       createVideoArray(cd_content.firstChild.childNodes,[0]);
  14.    }
  15. }
  16. function createVideoArray(nodes_array, depth_array)
  17. {
  18.    var _loc1_ = 0;
  19.    while(_loc1_ < nodes_array.length)
  20.    {
  21.       depth_array[depth_array.length - 1] += 1;
  22.       if(nodes_array[_loc1_].attributes.type == "movie")
  23.       {
  24.          video_array.push({chapter_id:depth_array.join(".") + ".",movie_name:nodes_array[_loc1_].attributes.name,movie:nodes_array[_loc1_].attributes.movie});
  25.       }
  26.       if(nodes_array[_loc1_].hasChildNodes())
  27.       {
  28.          createVideoArray(nodes_array[_loc1_].childNodes,depth_array.concat([0]));
  29.       }
  30.       _loc1_ = _loc1_ + 1;
  31.    }
  32.    if(depth_array.length == 1)
  33.    {
  34.       if(local_test)
  35.       {
  36.          createTestData();
  37.       }
  38.       loadPdBookmarks();
  39.    }
  40. }
  41. function createTestData()
  42. {
  43.    v2b_so.clear();
  44.    var _loc6_ = 0;
  45.    while(_loc6_ < 10)
  46.    {
  47.       var _loc7_ = Math.round(Math.random() * 2);
  48.       var _loc4_ = 0;
  49.       while(_loc4_ < _loc7_)
  50.       {
  51.          var _loc3_ = "";
  52.          var _loc2_ = "";
  53.          var _loc1_ = 0;
  54.          var _loc5_ = 1 + Math.round(Math.random() * 3);
  55.          _loc1_ = 0;
  56.          while(_loc1_ < _loc5_)
  57.          {
  58.             _loc3_ += "Das ist ein Test - getestet. ";
  59.             _loc1_ = _loc1_ + 1;
  60.          }
  61.          _loc5_ = 1 + Math.round(Math.random() * 10);
  62.          _loc1_ = 0;
  63.          while(_loc1_ < _loc5_)
  64.          {
  65.             _loc2_ += "Abla bla sdfs dfs Gdfsdf sdf sdf sd sd fsdgqfsdf sdf.";
  66.             _loc1_ = _loc1_ + 1;
  67.          }
  68.          saveBookmarks(video_array[_loc6_].movie,3 + Math.round(Math.random() * 100),_loc3_,_loc2_);
  69.          _loc4_ = _loc4_ + 1;
  70.       }
  71.       _loc6_ = _loc6_ + 1;
  72.    }
  73. }
  74. function saveBookmarks(movie, _time, description, memo)
  75. {
  76.    temp_array = new Array();
  77.    var _loc2_ = false;
  78.    var _loc3_ = movie.split(".")[0] + "_data";
  79.    var temp_array = new Array();
  80.    if(v2b_so.data[_loc3_] == undefined)
  81.    {
  82.       v2b_so.data[_loc3_] = new Object();
  83.    }
  84.    if(v2b_so.data[_loc3_].bookmarks != undefined)
  85.    {
  86.       temp_array = v2b_so.data[_loc3_].bookmarks;
  87.       var _loc1_ = 0;
  88.       while(_loc1_ < temp_array.length)
  89.       {
  90.          if(temp_array[_loc1_].sec == _time)
  91.          {
  92.             temp_array[_loc1_].description = description;
  93.             temp_array[_loc1_].memo = memo;
  94.             temp_array[_loc1_].bm_date = createDateString(new Date());
  95.             _loc2_ = true;
  96.             break;
  97.          }
  98.          _loc1_ = _loc1_ + 1;
  99.       }
  100.    }
  101.    if(!_loc2_)
  102.    {
  103.       var _loc4_ = new Object();
  104.       _loc4_.sec = Number(_time);
  105.       _loc4_.description = description;
  106.       _loc4_.memo = memo;
  107.       _loc4_.movie = movie;
  108.       _loc4_.bm_date = createDateString(new Date());
  109.       temp_array.push(_loc4_);
  110.       temp_array.sortOn("sec",Array.NUMERIC);
  111.    }
  112.    v2b_so.data[_loc3_].bookmarks = temp_array;
  113.    v2b_so.flush();
  114. }
  115. function generateSettings()
  116. {
  117.    if(_global.$tweenManager == undefined)
  118.    {
  119.       _global.$tweenManager = new zigo.tweenManager();
  120.    }
  121.    else
  122.    {
  123.       _global.$tweenManager.cleanUp();
  124.       _global.$tweenManager.init();
  125.    }
  126.    com.robertpenner.easing.Back;
  127.    com.robertpenner.easing.Bounce;
  128.    com.robertpenner.easing.Circ;
  129.    com.robertpenner.easing.Cubic;
  130.    com.robertpenner.easing.Elastic;
  131.    com.robertpenner.easing.Expo;
  132.    com.robertpenner.easing.Linear;
  133.    com.robertpenner.easing.Quad;
  134.    com.robertpenner.easing.Quart;
  135.    com.robertpenner.easing.Quint;
  136.    com.robertpenner.easing.Sine;
  137.    var Mp = MovieClip.prototype;
  138.    Mp.addListener = function()
  139.    {
  140.       if(!this._listeners)
  141.       {
  142.          AsBroadcaster.initialize(this);
  143.       }
  144.       this.addListener.apply(this,arguments);
  145.    };
  146.    ASSetPropFlags(Mp,"addListener",1,0);
  147.    Mp.tween = function(props, pEnd, seconds, animType, delay, callback, extra1, extra2)
  148.    {
  149.       if(_global.$tweenManager.isTweenLocked(this))
  150.       {
  151.          return undefined;
  152.       }
  153.       if(arguments.length < 2)
  154.       {
  155.          return undefined;
  156.       }
  157.       if(typeof props == "string")
  158.       {
  159.          if(props.indexOf(",") > -1)
  160.          {
  161.             props = props.split(" ").join("").split(",");
  162.          }
  163.          else
  164.          {
  165.             props = [props];
  166.          }
  167.       }
  168.       if(!(pEnd instanceof Array))
  169.       {
  170.          pEnd = [pEnd];
  171.          while(pEnd.length < props.length)
  172.          {
  173.             pEnd.push(pEnd[0]);
  174.          }
  175.       }
  176.       if(seconds == undefined)
  177.       {
  178.          seconds = 2;
  179.       }
  180.       else if(seconds < 0.01)
  181.       {
  182.          seconds = 0;
  183.       }
  184.       if(delay < 0.01 || delay == undefined)
  185.       {
  186.          delay = 0;
  187.       }
  188.       switch(typeof animType)
  189.       {
  190.          case "string":
  191.             animType = animType.toLowerCase();
  192.             if(animType == "linear")
  193.             {
  194.                var eqf = com.robertpenner.easing.Linear.easeNone;
  195.             }
  196.             else if(animType.indexOf("easeoutin") == 0)
  197.             {
  198.                var t = animType.substr(9);
  199.                t = t.charAt(0).toUpperCase() + t.substr(1);
  200.                var eqf = com.robertpenner.easing[t].easeOutIn;
  201.             }
  202.             else if(animType.indexOf("easeinout") == 0)
  203.             {
  204.                var t = animType.substr(9);
  205.                t = t.charAt(0).toUpperCase() + t.substr(1);
  206.                var eqf = com.robertpenner.easing[t].easeInOut;
  207.             }
  208.             else if(animType.indexOf("easein") == 0)
  209.             {
  210.                var t = animType.substr(6);
  211.                t = t.charAt(0).toUpperCase() + t.substr(1);
  212.                var eqf = com.robertpenner.easing[t].easeIn;
  213.             }
  214.             else if(animType.indexOf("easeout") == 0)
  215.             {
  216.                var t = animType.substr(7);
  217.                t = t.charAt(0).toUpperCase() + t.substr(1);
  218.                var eqf = com.robertpenner.easing[t].easeOut;
  219.             }
  220.             if(eqf == undefined)
  221.             {
  222.                var eqf = com.robertpenner.easing.Expo.easeOut;
  223.             }
  224.             break;
  225.          case "function":
  226.             var eqf = animType;
  227.             break;
  228.          case "object":
  229.             if(animType.ease != undefined && animType.pts != undefined)
  230.             {
  231.                var eqf = animType.ease;
  232.                extra1 = animType.pts;
  233.             }
  234.             else
  235.             {
  236.                var eqf = com.robertpenner.easing.Expo.easeOut;
  237.             }
  238.             break;
  239.          default:
  240.             var eqf = com.robertpenner.easing.Expo.easeOut;
  241.       }
  242.       switch(typeof callback)
  243.       {
  244.          case "function":
  245.             callback = {func:callback,scope:this._parent};
  246.             break;
  247.          case "string":
  248.             var ilp;
  249.             var funcp;
  250.             var scope;
  251.             var args;
  252.             var a;
  253.             ilp = callback.indexOf("(");
  254.             funcp = callback.slice(0,ilp);
  255.             scope = eval(funcp.slice(0,funcp.lastIndexOf(".")));
  256.             func = eval(funcp);
  257.             args = callback.slice(ilp + 1,callback.lastIndexOf(")")).split(",");
  258.             var i = 0;
  259.             while(i < args.length)
  260.             {
  261.                a = eval(args[i]);
  262.                if(a != undefined)
  263.                {
  264.                   args[i] = a;
  265.                }
  266.                i++;
  267.             }
  268.             callback = {func:func,scope:scope,args:args};
  269.       }
  270.       if(_global.$tweenManager.autoStop)
  271.       {
  272.          _global.$tweenManager.removeTween(this);
  273.       }
  274.       if(delay > 0)
  275.       {
  276.          _global.$tweenManager.addTweenWithDelay(delay,this,props,pEnd,seconds,eqf,callback,extra1,extra2);
  277.       }
  278.       else
  279.       {
  280.          _global.$tweenManager.addTween(this,props,pEnd,seconds,eqf,callback,extra1,extra2);
  281.       }
  282.    };
  283.    Mp.stopTween = function(props)
  284.    {
  285.       if(typeof props == "string")
  286.       {
  287.          if(props.indexOf(",") > -1)
  288.          {
  289.             props = props.split(" ").join("").split(",");
  290.          }
  291.          else
  292.          {
  293.             props = [props];
  294.          }
  295.       }
  296.       _global.$tweenManager.removeTween(this,props);
  297.    };
  298.    Mp.isTweening = function(prop)
  299.    {
  300.       return _global.$tweenManager.isTweening(this,prop);
  301.    };
  302.    Mp.getTweens = function()
  303.    {
  304.       return _global.$tweenManager.getTweens(this);
  305.    };
  306.    Mp.lockTween = function()
  307.    {
  308.       _global.$tweenManager.lockTween(this,true);
  309.    };
  310.    Mp.unlockTween = function()
  311.    {
  312.       _global.$tweenManager.lockTween(this,false);
  313.    };
  314.    Mp.isTweenLocked = function()
  315.    {
  316.       return _global.$tweenManager.isTweenLocked(this);
  317.    };
  318.    Mp.isTweenPaused = function(prop)
  319.    {
  320.       return _global.$tweenManager.isTweenPaused(this,prop);
  321.    };
  322.    Mp.pauseTween = function(props)
  323.    {
  324.       var _loc4_ = undefined;
  325.       if(props != undefined)
  326.       {
  327.          if(typeof props == "string")
  328.          {
  329.             if(props.indexOf(",") > -1)
  330.             {
  331.                props = props.split(" ").join("").split(",");
  332.             }
  333.             else
  334.             {
  335.                props = [props];
  336.             }
  337.          }
  338.          _loc4_ = {};
  339.          for(var _loc5_ in props)
  340.          {
  341.             _loc4_[props[_loc5_]] = true;
  342.          }
  343.       }
  344.       _global.$tweenManager.pauseTween(this,_loc4_);
  345.    };
  346.    Mp.unpauseTween = function(props)
  347.    {
  348.       var _loc4_ = undefined;
  349.       if(props != undefined)
  350.       {
  351.          if(typeof props == "string")
  352.          {
  353.             if(props.indexOf(",") > -1)
  354.             {
  355.                props = props.split(" ").join("").split(",");
  356.             }
  357.             else
  358.             {
  359.                props = [props];
  360.             }
  361.          }
  362.          _loc4_ = {};
  363.          for(var _loc5_ in props)
  364.          {
  365.             _loc4_[props[_loc5_]] = true;
  366.          }
  367.       }
  368.       _global.$tweenManager.unpauseTween(this,_loc4_);
  369.    };
  370.    Mp.pauseAllTweens = function()
  371.    {
  372.       _global.$tweenManager.pauseTween();
  373.    };
  374.    Mp.unpauseAllTweens = function()
  375.    {
  376.       _global.$tweenManager.unpauseTween();
  377.    };
  378.    Mp.stopAllTweens = function()
  379.    {
  380.       _global.$tweenManager.stopAll();
  381.    };
  382.    Mp.ffTween = function(props)
  383.    {
  384.       var _loc4_ = undefined;
  385.       if(props != undefined)
  386.       {
  387.          if(typeof props == "string")
  388.          {
  389.             if(props.indexOf(",") > -1)
  390.             {
  391.                props = props.split(" ").join("").split(",");
  392.             }
  393.             else
  394.             {
  395.                props = [props];
  396.             }
  397.          }
  398.          _loc4_ = {};
  399.          for(var _loc5_ in props)
  400.          {
  401.             _loc4_[props[_loc5_]] = true;
  402.          }
  403.       }
  404.       _global.$tweenManager.ffTween(this,_loc4_);
  405.    };
  406.    Mp.rewTween = function(props)
  407.    {
  408.       var _loc4_ = undefined;
  409.       if(props != undefined)
  410.       {
  411.          if(typeof props == "string")
  412.          {
  413.             if(props.indexOf(",") > -1)
  414.             {
  415.                props = props.split(" ").join("").split(",");
  416.             }
  417.             else
  418.             {
  419.                props = [props];
  420.             }
  421.          }
  422.          _loc4_ = {};
  423.          for(var _loc5_ in props)
  424.          {
  425.             _loc4_[props[_loc5_]] = true;
  426.          }
  427.       }
  428.       _global.$tweenManager.rewTween(this,_loc4_);
  429.    };
  430.    Mp.alphaTo = function(destAlpha, seconds, animType, delay, callback, extra1, extra2)
  431.    {
  432.       this.tween(["_alpha"],[destAlpha],seconds,animType,delay,callback,extra1,extra2);
  433.    };
  434.    Mp.scaleTo = function(destScale, seconds, animType, delay, callback, extra1, extra2)
  435.    {
  436.       this.tween(["_xscale","_yscale"],[destScale,destScale],seconds,animType,delay,callback,extra1,extra2);
  437.    };
  438.    Mp.sizeTo = function(destSize, seconds, animType, delay, callback, extra1, extra2)
  439.    {
  440.       this.tween(["_width","_height"],[destSize,destSize],seconds,animType,delay,callback,extra1,extra2);
  441.    };
  442.    Mp.slideTo = function(destX, destY, seconds, animType, delay, callback, extra1, extra2)
  443.    {
  444.       this.tween(["_x","_y"],[destX,destY],seconds,animType,delay,callback,extra1,extra2);
  445.    };
  446.    Mp.rotateTo = function(destRotation, seconds, animType, delay, callback, extra1, extra2)
  447.    {
  448.       this.tween(["_rotation"],[destRotation],seconds,animType,delay,callback,extra1,extra2);
  449.    };
  450.    _global.getColorTransObj = function(type, amt, rgb)
  451.    {
  452.       switch(type)
  453.       {
  454.          case "brightness":
  455.             var _loc4_ = 100 - Math.abs(amt);
  456.             var _loc6_ = 0;
  457.             if(amt > 0)
  458.             {
  459.                _loc6_ = 256 * (amt / 100);
  460.             }
  461.             return {ra:_loc4_,rb:_loc6_,ga:_loc4_,gb:_loc6_,ba:_loc4_,bb:_loc6_};
  462.          case "brightOffset":
  463.             _loc6_ = 256 * (amt / 100);
  464.             return {ra:100,rb:_loc6_,ga:100,gb:_loc6_,ba:100,bb:_loc6_};
  465.          case "contrast":
  466.             var _loc2_ = {};
  467.             var _loc0_ = null;
  468.             _loc2_.ba = _loc0_ = amt;
  469.             _loc2_.ga = _loc0_;
  470.             _loc2_.ra = _loc0_;
  471.             _loc2_.bb = _loc0_ = 128 - 1.28 * amt;
  472.             _loc2_.gb = _loc0_;
  473.             _loc2_.rb = _loc0_;
  474.             return _loc2_;
  475.          case "invertColor":
  476.             _loc2_ = {};
  477.             _loc2_.ba = _loc0_ = 100 - 2 * amt;
  478.             _loc2_.ga = _loc0_;
  479.             _loc2_.ra = _loc0_;
  480.             _loc2_.bb = _loc0_ = amt * 2.55;
  481.             _loc2_.gb = _loc0_;
  482.             _loc2_.rb = _loc0_;
  483.             return _loc2_;
  484.          case "tint":
  485.             if(rgb == undefined || rgb == null)
  486.             {
  487.                break;
  488.             }
  489.             var _loc8_ = rgb >> 16;
  490.             var _loc9_ = rgb >> 8 & 0xFF;
  491.             var _loc7_ = rgb & 0xFF;
  492.             var _loc5_ = amt / 100;
  493.             _loc2_ = {rb:_loc8_ * _loc5_,gb:_loc9_ * _loc5_,bb:_loc7_ * _loc5_};
  494.             _loc2_.ba = _loc0_ = 100 - amt;
  495.             _loc2_.ga = _loc0_;
  496.             _loc2_.ra = _loc0_;
  497.             return _loc2_;
  498.       }
  499.       return {rb:0,ra:100,gb:0,ga:100,bb:0,ba:100};
  500.    };
  501.    Mp.brightnessTo = function(bright, seconds, animType, delay, callback, extra1, extra2)
  502.    {
  503.       this.tween(["_ct_"],[getColorTransObj("brightness",bright)],seconds,animType,delay,callback,extra1,extra2);
  504.    };
  505.    Mp.brightOffsetTo = function(percent, seconds, animType, delay, callback, extra1, extra2)
  506.    {
  507.       this.tween(["_ct_"],[getColorTransObj("brightOffset",percent)],seconds,animType,delay,callback,extra1,extra2);
  508.    };
  509.    Mp.contrastTo = function(percent, seconds, animType, delay, callback, extra1, extra2)
  510.    {
  511.       this.tween(["_ct_"],[getColorTransObj("contrast",percent)],seconds,animType,delay,callback,extra1,extra2);
  512.    };
  513.    Mp.colorTo = function(rgb, seconds, animType, delay, callback, extra1, extra2)
  514.    {
  515.       this.tween(["_ct_"],[getColorTransObj("tint",100,rgb)],seconds,animType,delay,callback,extra1,extra2);
  516.    };
  517.    Mp.colorTransformTo = function(ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2)
  518.    {
  519.       var _loc2_ = {ra:ra,rb:rb,ga:ga,gb:gb,ba:ba,bb:bb,aa:aa,ab:ab};
  520.       this.tween(["_ct_"],[_loc2_],seconds,animType,delay,callback,extra1,extra2);
  521.    };
  522.    Mp.invertColorTo = function(percent, seconds, animType, delay, callback, extra1, extra2)
  523.    {
  524.       this.tween(["_ct_"],[getColorTransObj("invertColor",percent)],seconds,animType,delay,callback,extra1,extra2);
  525.    };
  526.    Mp.tintTo = function(rgb, percent, seconds, animType, delay, callback, extra1, extra2)
  527.    {
  528.       this.tween(["_ct_"],[getColorTransObj("tint",percent,rgb)],seconds,animType,delay,callback,extra1,extra2);
  529.    };
  530.    Mp.getFrame = function()
  531.    {
  532.       return this._currentframe;
  533.    };
  534.    Mp.setFrame = function(fr)
  535.    {
  536.       this.gotoAndStop(Math.round(fr));
  537.    };
  538.    Mp.addProperty("_frame",Mp.getFrame,Mp.setFrame);
  539.    Mp.frameTo = function(endframe, duration, animType, delay, callback, extra1, extra2)
  540.    {
  541.       if(endframe == undefined)
  542.       {
  543.          endframe = this._totalframes;
  544.       }
  545.       this.tween("_frame",endframe,duration,animType,delay,callback,extra1,extra2);
  546.    };
  547.    var TFP = TextField.prototype;
  548.    if(!TFP.origAddListener)
  549.    {
  550.       TFP.origAddListener = TFP.addListener;
  551.       ASSetPropFlags(TFP,"origAddListener",1,0);
  552.       TFP.addListener = function()
  553.       {
  554.          if(!this._listeners)
  555.          {
  556.             AsBroadcaster.initialize(this);
  557.          }
  558.          this.origAddListener.apply(this,arguments);
  559.       };
  560.    }
  561.    var $_$methods = ["tween","stopTween","isTweening","getTweens","lockTween","isTweenLocked","unlockTween","isTweenPaused","pauseTween","unpauseTween","pauseAllTweens","unpauseAllTweens","stopAllTweens","ffTween","rewTween","getFrame","setFrame","_frame","frameTo","alphaTo","brightnessTo","colorTo","colorTransformTo","invertColorTo","tintTo","scaleTo","sizeTo","slideTo","rotateTo","brightOffsetTo","contrastTo"];
  562.    for(var $_$i in $_$methods)
  563.    {
  564.       ASSetPropFlags(Mp,$_$methods[$_$i],1,0);
  565.       if($_$methods[$_$i].toLowerCase().indexOf("frame") == -1)
  566.       {
  567.          TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]];
  568.          ASSetPropFlags(TFP,$_$methods[$_$i],1,0);
  569.       }
  570.    }
  571.    delete Mp;
  572.    delete TFP;
  573.    delete $_$methods;
  574.    delete $_$i;
  575.    TextField.prototype.typeWriter = function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
  576.    {
  577.       clearInterval(this.tw__interval);
  578.       var originalTxt = arg1;
  579.       this._visible = false;
  580.       if(this.html)
  581.       {
  582.          this.htmlText = arg1;
  583.       }
  584.       else
  585.       {
  586.          this.text = arg1;
  587.       }
  588.       if(arg4 == undefined || null)
  589.       {
  590.          arg4 = "";
  591.       }
  592.       var txt = this.text;
  593.       var txt_length = txt.length;
  594.       this.text = "";
  595.       if(this.autoSize == false || "none")
  596.       {
  597.          var last_visible_word = 0;
  598.          var last_visible_character = 0;
  599.          var txt_array = txt.split(" ");
  600.          var temp_string = "";
  601.          var i = 0;
  602.          while(i < txt_array.length)
  603.          {
  604.             temp_string += txt_array[i] + " ";
  605.             this.text = temp_string;
  606.             if(this.textHeight > this._height)
  607.             {
  608.                last_visible_character = temp_string.length;
  609.                last_visible_word = i - 1;
  610.                break;
  611.             }
  612.             i++;
  613.          }
  614.          if(last_visible_word == 0)
  615.          {
  616.             last_visible_character = txt_length;
  617.          }
  618.       }
  619.       else
  620.       {
  621.          last_visible_character = txt_length;
  622.       }
  623.       this.text = "";
  624.       this._visible = true;
  625.       txt_array = [];
  626.       var w = 0;
  627.       var dw = Math.acos((last_visible_character - 0.2) / last_visible_character);
  628.       var characters_counter = 0;
  629.       var characters = 0;
  630.       var characters_basis = last_visible_character;
  631.       var characters_div = 0;
  632.       if(last_visible_character > arg3)
  633.       {
  634.          var characters = Math.round(last_visible_character * Math.sin(dw));
  635.          while(characters_counter < last_visible_character - arg3)
  636.          {
  637.             txt_array.push(txt.substring(characters_counter,characters_counter + characters));
  638.             characters_counter += characters;
  639.          }
  640.          characters_basis = last_visible_character - characters_counter;
  641.          characters_div = characters_counter;
  642.          dw = Math.acos((characters_basis - 0.2) / characters_basis);
  643.       }
  644.       var w = dw;
  645.       while(w <= 1.5707963267948966)
  646.       {
  647.          characters = Math.round(characters_div + characters_basis * Math.sin(w));
  648.          if(characters <= characters_counter)
  649.          {
  650.             characters = characters_counter + 1;
  651.          }
  652.          if(characters >= last_visible_character)
  653.          {
  654.             characters = last_visible_character;
  655.             txt_array.push(txt.substring(characters_counter,characters));
  656.             break;
  657.          }
  658.          txt_array.push(txt.substring(characters_counter,characters));
  659.          characters_counter = characters;
  660.          w += dw;
  661.       }
  662.       temp_string = "";
  663.       var txtPfad = this;
  664.       var tw__interval = this.tw__interval = setInterval(function()
  665.       {
  666.          if(eval(txtPfad) == undefined)
  667.          {
  668.             clearInterval(tw__interval);
  669.          }
  670.          if(txt_array.length > 0)
  671.          {
  672.             temp_string += txt_array.shift();
  673.             txtPfad.text = temp_string + arg4;
  674.          }
  675.          else
  676.          {
  677.             clearInterval(tw__interval);
  678.             if(txtPfad.html)
  679.             {
  680.                txtPfad.htmlText = originalTxt;
  681.             }
  682.             else
  683.             {
  684.                txtPfad.text = originalTxt;
  685.             }
  686.             if(arg5)
  687.             {
  688.                txtPfad.styleSheet = arg5;
  689.             }
  690.             if(arg6)
  691.             {
  692.                arg6.apply(null,arg7);
  693.             }
  694.          }
  695.       }
  696.       ,arg2);
  697.    };
  698.    ASSetPropFlags(TextField.prototype,"typeWriter",1,0);
  699.    TextField.prototype.stringCutter_advanced = function(arg1, arg2)
  700.    {
  701.       var _loc8_ = this.textHeight;
  702.       if(arg1 == undefined)
  703.       {
  704.          arg1 = " ";
  705.       }
  706.       var _loc4_ = 0;
  707.       this.scroll = 1;
  708.       while(this.maxscroll > 1)
  709.       {
  710.          var _loc2_ = 0;
  711.          while(this.scroll <= 1 && _loc2_ < this.text.length)
  712.          {
  713.             _loc2_ = _loc2_ + 1;
  714.             Selection.setFocus(this);
  715.             this.scroll = 1;
  716.             Selection.setSelection(0,_loc2_);
  717.          }
  718.          var _loc5_ = this.text.lastIndexOf("\r",_loc2_ - _loc4_);
  719.          var _loc6_ = this.text.lastIndexOf(" ",_loc2_ - _loc4_);
  720.          var _loc3_ = Math.max(_loc5_,_loc6_);
  721.          if(_loc3_ == -1)
  722.          {
  723.             _loc3_ = _loc2_ - _loc4_ - arg1.length - 1;
  724.             break;
  725.          }
  726.          Selection.setFocus(this);
  727.          Selection.setSelection(_loc3_,this.length);
  728.          this.replaceSel(arg1);
  729.          this.scroll = 1;
  730.          _loc4_ += 2;
  731.       }
  732.       if(arg2)
  733.       {
  734.          this.styleSheet = arg2;
  735.       }
  736.    };
  737.    ASSetPropFlags(TextField.prototype,"stringCutter_advanced",1,0);
  738.    submenu_header_color = "ffffff";
  739.    submenu_subheader_color = "a7a7a7";
  740.    submenu_color = "a7a7a7";
  741.    submenu_rollover_color = "ffffff";
  742.    submenu_rollover_alpha = "10";
  743.    teaser_header_color = "ffffff";
  744.    teaser_subheader_color = "a7a7a7";
  745.    teaser_subheader2_color = "ffffff";
  746.    teaser_text_color = "a7a7a7";
  747.    seperator_line_color = "ffffff";
  748.    seperator_line_alpha = "15";
  749.    btn_text_color = "000000";
  750.    btn_text_color_pressed = "888888";
  751.    btn_rollover_color = "a7296a";
  752.    btn_pressed_color = "232323";
  753.    index_color = "ffffff";
  754.    form_highlight_color = "ff0000";
  755.    form_highlight_alpha = "100";
  756.    form_text_color = "ff0000";
  757.    my_bm_label = "Meine Lesezeichen";
  758.    my_bm_desc = "Sie haben folgende Lesezeichen gesetzt.";
  759.    my_bm_teaser_info_label = "Info";
  760.    my_bm_teaser_info_desc = "W√§hlen Sie ein Lesezeichen aus.";
  761.    my_bm_start_video_desc = "Film bei diesem Lesezeichen starten.";
  762.    my_bm_no_bookmarks_desc = "Sie haben noch keine Lesezeichen gesetzt.";
  763.    my_bm_show_legend = "true";
  764.    my_bm_legend_desc = "meine Lesezeichen";
  765.    my_bm_pd_legend_desc = "video2brain Lesezeichen";
  766.    edit_bookmark_desc = "Lesezeichen editieren";
  767.    predefined_bookmark_desc = "video2brain Lesezeichen";
  768.    bookmark_save_button_desc = "Speichern";
  769.    bookmark_cancle_button_desc = "Abbrechen";
  770.    bookmark_del_desc = "Lesezeichen l√∂schen";
  771.    bookmark_del_question = "M√∂chten Sie das Lesezeichen wirklich l√∂schen?";
  772.    bookmark_del_confirm = "Ja";
  773.    bookmark_del_negate = "Nein";
  774.    parseColor = function(_color)
  775.    {
  776.       parsed_color = parseInt("0x" + _color,16);
  777.       return parsed_color;
  778.    };
  779.    toolTip = function(_text_info, __mc, _align, _offset_x, _offset_y)
  780.    {
  781.       clearInterval(tooltip_delay);
  782.       tooltip_delay = setTimeout(attachToolTip,250,_text_info,__mc,_align,_offset_x,_offset_y);
  783.    };
  784.    attachToolTip = function(_text_info, __mc, _align, _offset_x, _offset_y)
  785.    {
  786.       offset_x = 0;
  787.       offset_y = 0;
  788.       if(_offset_x)
  789.       {
  790.          offset_x = _offset_x;
  791.       }
  792.       if(_offset_y)
  793.       {
  794.          offset_y = _offset_y;
  795.       }
  796.       __mc.attachMovie("tool_tip_mc","tool_tip_mc",__mc.getNextHighestDepth());
  797.       current_tool_tip = __mc.tool_tip_mc;
  798.       current_tool_tip.text_info = _text_info;
  799.       current_tool_tip.t_align = _align;
  800.       current_tool_tip._x = -12 - offset_x;
  801.       current_tool_tip._y = -30 - offset_y;
  802.       clearInterval(tooltip_delay);
  803.       tooltip_delay = setTimeout(killToolTip,tooltip_delay_time);
  804.    };
  805.    killToolTip = function()
  806.    {
  807.       clearInterval(tooltip_delay);
  808.       current_tool_tip.removeMovieClip();
  809.    };
  810. }
  811.